<?php 	$a = count($news);
		//foreach ($news as $news_item): 
		for ($i = $a-1; $i >= 0; $i--) 
		{?>
    <h2><?php echo $news[$i]['title'] ?></h2>
    <div id="main">
        <?php echo $news[$i]['text'] ?> <br>
        
    </div>
    <p><a href="<?php 
					if ($mode=='admin' && $type == 'news') 
						echo site_url("welcome_admin/admin_news_view")."/".$news[$i]['slug']; 
					else if ($mode=='client' && $type == 'news') 
						echo site_url("welcome/news_view")."/".$news[$i]['slug'];
					else if ($mode == 'admin' && $type == 'gossip')
						echo site_url("welcome_admin/admin_gossip_view")."/".$news[$i]['slug'];
					else
						echo site_url("welcome/gossip_view")."/".$news[$i]['slug'];?>">
					View article</a></p>
    <?php } ?>
